import defaultData from "./data";
import { WeaInput, WeaLocaleProvider } from 'ecCom';
import { Row } from "antd";
import Props from "../base/Props";
import utils from "../../../../../utils";
import DefaultVal from '../../../../common/default-value';

const getLabel = WeaLocaleProvider.getLabel;

export default class TextareaProps extends Props {
  handlePlaceholderChange = value => {
    return this.props.onChange({
      'placeholder': value,
      'key': utils.UUID()
    });
  }

  renderDefaultValue() {
    const { data } = this.props;
    const { defaultValue } = data;
    return (
      <DefaultVal ecId={`${this && this.props && this.props.ecId || ''}_DefaultVal@izi90n`} 
        value={defaultValue}
        onChange={super.handlePropChange('defaultValue')}
      />
    );
  }

}

TextareaProps.defaultProps = {
  data: defaultData
};